package org.msfj.common.annotation;


import cn.hutool.core.collection.CollectionUtil;

import java.util.Map;

/**
 * @Description: 常量表
 * @Author: like
 * @Date: 2017-10-20 15:49
 * @Version: 1.0
 * @Created in idea by autoCode
 */
public interface Constants {
    /**
     * 异常信息统一头信息<br>
     * 非常遗憾的通知您,程序发生了异常
     */
    public static final String Exception_Head = "发生了异常 :";
    /**
     * 缓存键值
     */
    public static final Map<Class<?>, String> cacheKeyMap = CollectionUtil.newHashMap();
    /**
     * 操作名称
     */
    public static final String OPERATION_NAME = "OPERATION_NAME";
    /**
     * 客户端语言
     */
    public static final String USERLANGUAGE = "userLanguage";
    /**
     * 客户端主题
     */
    public static final String WEBTHEME = "webTheme";
    /**
     * 当前用户
     */
    public static final String CURRENT_USER = "CURRENT_USER";
    /**
     * 在线用户数量
     */
    public static final String ALLUSER_NUMBER = "ALLUSER_NUMBER";
    /**
     * 登录用户数量
     */
    public static final String USER_NUMBER = "USER_NUMBER";
    /**
     * 上次请求地址
     */
    public static final String PREREQUEST = "PREREQUEST";
    /**
     * 上次请求时间
     */
    public static final String PREREQUEST_TIME = "PREREQUEST_TIME";
    /**
     * 登录地址
     */
    public static final String LOGIN_URL = "/login.html";
    /**
     * 非法请求次数
     */
    public static final String MALICIOUS_REQUEST_TIMES = "MALICIOUS_REQUEST_TIMES";
    /**
     * 缓存命名空间
     */
    public static final String CACHE_NAMESPACE = "msfj:";

    /**
     * 缓存命名空间
     */
    public static final String REDIS_SET_KEY = "~keys";
    /**
     * 系统枚举类型的缓存key
     */
    public static final String ENUMS_CACHE_KEY = "msfj:enums-cache";

    public static final String REFRESH_TOKEN = "refresh_token";

    /**
     * 系统枚举类型的缓存key
     */
    public static final String ALL_REDIS_KEYS = "all-redis-keys";
    public final static String RESOURCE_TYPE_MENU = "menu";
    public final static String RESOURCE_TYPE_BTN = "button";
    public static final String CONTEXT_KEY_USER_ID = "currentUserId";
    public static final String CONTEXT_KEY_USERNAME = "currentUserName";
    public static final String CONTEXT_KEY_USER_NAME = "currentUser";
    public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken";
    public static final String JWT_KEY_USER_ID = "userId";
    public static final String JWT_KEY_NAME = "name";
    public static final String CONTEXT_KEY_MEMBER_ID = "currentMemberId";
    public static final String CONTEXT_KEY_MEMBERNAME = "currentMemberName";
    public static final String CONTEXT_KEY_MEMBER_NAME = "currentMember";
    public static final String CONTEXT_KEY_MEMBER_TOKEN = "currentMemberToken";
    public static final int PW_ENCORDER_SALT = 12;
    public static final String CLIENT_SECRET_CHARACTER = "deyatong:";
    public static final String USER_PERMS_KEY_PREFIX = "CACHE_USER_PERMS:";
    public static final String ALL_PERMS_KEY = "CACHE_ALL_PERMS";

    /**
     * 日志表状态
     */
    public interface JOBSTATE {
        /**
         * 日志表状态，初始状态，插入
         */
        public static final String INIT_STATS = "I";
        /**
         * 日志表状态，成功
         */
        public static final String SUCCESS_STATS = "S";
        /**
         * 日志表状态，失败
         */
        public static final String ERROR_STATS = "E";
        /**
         * 日志表状态，未执行
         */
        public static final String UN_STATS = "N";
    }
}
